/******************************************************************************
*
* This file is part of FreeTrack (http://code.google.com/p/qtfreetrack).
* BY Willy Gardiol (willy@gardiol.org)
*
* FreeTrack is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* FreeTrack is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Foobar.  If not, see <http://www.gnu.org/licenses/>
*
******************************************************************************/

#ifndef LAYERLABEL_H
#define LAYERLABEL_H

#include "IncFreeTrack.h"
#include "freetrackwidget.h"

class FTLabel;
class FTPushButton;
class Layer;

class LayerLabel : public FreeTrackWidget
{
    Q_OBJECT
public:
    explicit LayerLabel(Layer* layer);

    void paintEvent(QPaintEvent *);

public slots:
    // Called by edit_button
    void editLayer();
    // update the layer title
    void liveTitleUpdate(QString);
    // update the layer description
    void liveDescUpdate(QString);

private:
    FTPushButton* edit_button;
    FTLabel* desc_label;
    FTLabel* title_label;
    QWidget* specific_data;

    Layer* layer;

    QLayout* createHorizontal();
    QLayout* createVertical();
};


#endif // LAYERLABEL_H
